JIRA 7 Essentials - Fourth Edition by Patrick Li

JIRA 7 Essentials - Fourth Edition by Patrick Li

Author:Patrick Li [Li, Patrick]
Language: eng
Format: epub
Published: 2019-09-13T08:12:51+00:00


Example Custom Event

issueevent

Here, we register a new custom mail template entry and the details are given in the following table:

After creating your templates and registering them in the mapping file, you will have to restart JIRA for the changes to be picked up. The new templates will be available when we create new events, as covered in the following section.

Adding a custom event

JIRA comes with a comprehensive list of system events focused around issue-related operations. However, there will be times when you will need to create custom-designed events representing specialized business operations, or when you simply need to use a custom e-mail template.

Perform the following steps to add a new custom event:

Browse to the View Events page.

Enter a name and description for the new event in the Add New Event section.

Select the mail template for the new event.

Click on the Add button to create a new event:

Firing a custom event

Unlike system events, with custom events, you need to tell JIRA when it can fire a custom event.

Custom events are mostly fired by workflow transitions. If you recall from Chapter 7 , Workflow and Business Process , you can add post functions to workflow transitions. Almost all of JIRA's transitions will have a post function that fires an appropriate event. It is important to understand that just because an event is fired does not mean that there needs to be something to listen to it.

If you skipped Chapter 7 , Workflow and Business Process , or still do not have a good understanding on workflows, now is be a good time to go back and revisit the chapter.

Perform the following steps to fire a custom event from a workflow post function:

Browse to the View Workflows page.

Click on the Edit link for the workflow that will be used to fire the event.

Click on the transition that will fire the event when executed.

Click on the Post Functions tab.

Click on the Edit link for the post function that reads Fire a event that can be processed by the listeners :

Select the custom event from the drop-down list.

Click on the Update button to apply the changes to the post function.

Publish the workflow.

Now, whenever the workflow transition is executed, the post function will run and fire the selected event. Each transition can fire only one event, so you cannot have both Issue Created and Issue Updated events being fired from the same transition.

Notifications

Notifications associate events (both system and custom) to e-mail recipients. When an event is fired and picked up, e-mails will be sent out. Notification types define recipients of e-mails. For example, you can set them to only send e-mails to a specific user or all members from a given user group. You can add multiple notifications to a given event.

JIRA ships with a comprehensive list of notification types (that is, the recipients) that will cover many of your needs. The following table lists all the notification types available and how they work:

As you can see, the list includes a wide range of options from issue reporters to values contained in custom fields.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.